package net.chrisrichardson.ec2deployer.core

class EC2InstanceStateTest extends GroovyTestCase {

    EC2InstanceState a
    EC2InstanceState b
    EC2InstanceState c

    protected void setUp() {
        super.setUp();
        a = new EC2InstanceState("x", "ami-123", "pending", "eastcoast")
        b = new EC2InstanceState("x", "ami-123", "pending", "eastcoast")
        c = new EC2InstanceState("x", "ami-123", "running", "eastcoast")
    }


    public void testEquals() {
        assert a == b
    }

    public void testEquals_different() {
        assert a != c
    }

    public void testHashCode() {
       assertNotNull a.hashCode()
    }
}